package com.stox.services.watchlist.manager.impl;

import java.util.List;

import com.stox.services.watchlist.manager.WatchlistEntryManager;
import com.stox.services.watchlist.repository.WatchlistEntryRepository;
import com.stox.shared.watchlist.model.WatchlistEntry;

public class WatchlistEntryManagerImpl implements WatchlistEntryManager {
	
	public static final WatchlistEntryManagerImpl INSTANCE = new WatchlistEntryManagerImpl();
	
	private WatchlistEntryManagerImpl() {
		
	}
	
	@Override
	public List<WatchlistEntry> findByWatchlistId(Long watchlistId) {
		return WatchlistEntryRepository.INSTANCE.findByWatchlistId(watchlistId);
	}

	@Override
	public Long saveOrUpdate(WatchlistEntry watchlistEntry) {
		return WatchlistEntryRepository.INSTANCE.saveOrUpdate(watchlistEntry);
	}

	@Override
	public void delete(Long id) {
		WatchlistEntryRepository.INSTANCE.delete(id);
	}

}
